//
//  ViewController.m
//  物理仿真
//
//  Created by Annie on 2020/5/23.
//  Copyright © 2020 Annie. All rights reserved.
//

#import "ViewController.h"
#import "FMGravityBehaviorViewController.h"
#import "FMAttachmentBehaviorViewController.h"

@interface ViewController ()

@end

@implementation ViewController



- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 2;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    static NSString *ID = @"cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID forIndexPath:indexPath];
    if (indexPath.row == 0) {
        cell.textLabel.text = @"重力引擎";
    }else if (indexPath.row == 1){
        cell.textLabel.text = @"附着行为";
    }
    
    return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    if (indexPath.row == 0) {
        FMGravityBehaviorViewController *vc = [FMGravityBehaviorViewController new];
        vc.title = @"重力仿真";
        [self.navigationController pushViewController:vc animated:YES];
    }else if (indexPath.row == 1){
        FMAttachmentBehaviorViewController *vc = [FMAttachmentBehaviorViewController new];
        vc.title = @"附着行为";
        [self.navigationController pushViewController:vc animated:YES];

    }
}


@end
